package com.cheboohui.iqs.spider.pingan.price;

import com.alibaba.fastjson.JSONObject;
import com.cheboohui.iqs.spider.pingan.entity.DutyFree;

/**
 * 免税车---参数修改
 * 
 * @author xielonghai
 *
 */
public class ChangeVehicleTaxInfo {
	/***
	 * 判断车辆是否免税
	 * 
	 * @param default_res
	 * @return
	 */
	public static DutyFree judgeVeh(JSONObject response) {
		try {
			JSONObject c51DiscountTaxMap = response.getJSONObject("c51DiscountTaxMap");
			String rate = c51DiscountTaxMap.getString("rate");
			if (null != rate && !"".equals(rate.trim())){
				return new DutyFree(true, c51DiscountTaxMap.toString());
			}else{
				return new DutyFree(false);
			}
		} catch (Exception e) {
			return new DutyFree(false);
		}
	}
}
